#pragma once
#include "sgobject.h"
#include "SgPtr.h"

class CSgMaterial :
	public CSgObject
{
public:
	CSgMaterial(float shininess, float diffuse[4], float specular[4]);
	CSgMaterial(float shininess, float diffuse_R, float diffuse_G, float diffuse_B, float diffuse_A, float specular_R, float specular_G, float specular_B, float specular_A);
	~CSgMaterial(void);

	void SetMaterial(float shininess, float diffuse_R, float diffuse_G, float diffuse_B, float diffuse_A, float specular_R, float specular_G, float specular_B, float specular_A);
	void SetChild(CSgObject* p_child) {/*p_child->IncRef();*/ m_child = p_child;}
	virtual void Render();

private:
	CSgPtr<CSgObject> m_child;
	bool m_smoothshading;
	float m_shininess[1];
	float m_diffuse[4]; // rgba
	float m_specular[4]; // rgba
};
